<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="static/bootstrap/css/bootstrap.min.css">
    <title>达意科技工作日志</title>
    <style>
        .hover{
            background-color: #ffffff;
        }
    </style>
</head>

<body>

<div class="container-fluid">
    <!-- Static navbar -->
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">TSDYKJ</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <!--<li><a data-toggle="collapse" href="#history_table">Diarys</a></li>-->
                    <li><a href="javascript:switch_table()"  id="switch_table">Historys</a></li>
                    <li><a href="http://60.2.176.70:9889/about">About</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right ">
                    <li><a href="#" data-toggle="modal" data-target="#settingsModal">Person Settings</a></li>
                </ul>
            </div>
            <!--/.nav-collapse -->
        </div>
        <!--/.container-fluid -->
    </nav>

    <!-- Main component for a primary marketing message or call to action -->
    <div class="jumbotron">
        <table class="table" id="main_table"  >
            <thead>
            <tr>
                <th></th>
                <th>项目</th>
                <th>描述</th>
                <th></th>
                <th style="display: none;">id</th>
            </tr>
            </thead>
            <tbody id="today-list">

            </tbody>

            <div id="main_btn_group" >
                <button class="btn btn-primary pull-left" style="margin-right: 10px" data-toggle="modal" data-target="#editModal">增加</button>
                <button id="batch_remove" class="btn btn-default btn-danger pull-left" disabled onclick="remove_project_infl_by_selected()">删除</button>
                <button class="btn btn-success pull-right" onclick="send()">发送日志</button>
            </div>

        </table>

        <table class="table" id="history_table" hidden>
            <thead>
            <tr>
                <th>日期</th>
                <th>文件</th>
                <th>发送</th>
                <th></th>
            </tr>
            </thead>
            <tbody id="history-list">

            </tbody>
        </table>


    </div>

    <div id="divtext">

    </div>
</div>
<!-- /container -->
<div class="modal fade" id="editModal" tabindex="-1" role="dialog"
     onfocus="javascript:$('#projectName').focus();"
     aria-labelledby="myModalLabel" aria-hidden="true" >
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    新增/编辑项目信息
                </h4>
            </div>
            <div class="modal-body">

                <div class="form-group">
                    <label for="projectName">项目名称:</label>
                    <input type="text" class="form-control" id="projectName"/>

                    <label for="projectDescription">详细信息:</label><br/>
                    <textarea name="projectDescription" id="projectDescription" class="form-control"
                              rows="10"></textarea>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"
                        onclick="hideEditModal()">取消
                </button>
                <button type="button" class="btn btn-primary" id="project_save" onclick="save_project_info()">
                    提交
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
</div>
<!-- /.modal -->

<div class="modal fade" id="loginModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="Login">
                    用户登录
                </h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label for="user_id">员工编号:</label>
                    <input type="text" class="form-control" id="user_id"/>
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">取消
                </button>
                <button type="button" class="btn btn-primary" id="userLogin">
                    登录
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
</div>
<!-- /.modal -->

<!-- Modal -->
<div class="modal fade" id="pleaseWaitDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title"> 正在生成并发送日志，请稍候... </h4>
            </div>
            <div class="modal-body">
                <div class="progress">
                    <div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
                        <!--<span class="sr-only">40% Complete (success)</span>-->
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<div class="modal fade" id="settingsModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title">
                    用户设置
                </h4>
            </div>
            <div class="modal-body">
                <div class="form-group">

                    <label for="user_name">员工姓名:</label>
                    <input type="text" class="form-control" id="user_name"/>

                    <label for="user_mail">QQ邮箱:</label>
                    <input type="email" class="form-control" id="user_mail"/>

                    <label for="mail_pwd">QQ密码:</label>
                    <input type="password" class="form-control" id="mail_pwd"/>

                    <label for="mail2">转发邮箱:</label>
                    <input type="email" class="form-control" id="mail2"/>

                    <label for="user_depart">部门名称:</label>
                    <input type="text" class="form-control" id="user_depart"/>

                    <label for="prefix_flag">日志前缀:</label>
                    <input type="text" class="form-control" id="prefix_flag"/>


                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">取消
                </button>
                <button type="button" class="btn btn-primary" id="btn_settings_save">
                    保存
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
</div>

<div class="modal fade" id="historyDetailModal" tabindex="-1" role="dialog"
     onfocus="javascript:$('#projectName').focus();"
     aria-labelledby="myModalLabel" aria-hidden="true" >
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    项目信息
                </h4>
            </div>
            <div class="modal-body" id="historyProjecBody">

                <table class="table">
                    <thead>
                    <tr>
                        <th>项目</th>
                        <th>详情</th>
                    </tr>
                    </thead>
                    <tbody id="history_detail">

                    </tbody>
                    </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"
                        onclick="hideEditModal()">关闭
                </button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
</div>


<script src="static/bootstrap/js/jquery-2.1.4.min.js"></script>
<script src="static/bootstrap/js/json2.js"></script>
<script src="static/bootstrap/js/bootstrap.min.js"></script>
<script src="func.js" charset="utf-8"></script>

</body>
</html>